home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1980-05-17 | 909 b | 25 lines |
- '********************ANIMATE THOSE BOBS!-By Mark Wickson***********************
- Rem okay,so we can move Bobs/Sprites without Amal,but animating them is a
- Rem little trickier-Again we use a variable to replace anormal number-In this
- Rem case,the image number of the bob-The variable is called "I".
- Rem First we set it to 1,then in the main loop,increase "I" by 1 then make
- Rem the program wait for a tenth of a second before returning to the start
- Rem of the loop.
- Rem We introduce the line :If I=4 then I=1
- Rem This says that if the image of the Bob is 4 then change it back to 1-So
- Rem this makes the Bob look as if it is jumping.
- Rem Of course,you can have more than 3 images in your animation,and they don't
- Rem have to start at image 1.
- Screen Open 0,320,256,16,Lowres
- Flash Off
- Curs Off
- Cls 0
- Load "ATTBG:JUMP.Abk"
- Get Sprite Palette
- I=1
- Do
- Bob 1,150,110,I
- I=I+1
- If I=4 Then I=1
- Wait 10
- Loop